Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with FFmpeg version no patch version #214

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

rgonzalezfluendo
Copy link
Contributor

When

$ ffmpeg -version
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers

Error:

Traceback (most recent call last):
  File "/home/rgonzalez/src/github.com/fluendo/fluster/./fluster.py", line 23, in <module>
    fluster_main()
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/main.py", line 41, in fluster_main
    main.run()
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/main.py", line 85, in run
    args.func(args, fluster)
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/main.py", line 371, in _list_cmd
    fluster.list_decoders(check=args.check, verbose=args.verbose)
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/fluster.py", line 204, in list_decoders
    if decoder.check(verbose)
       ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/decoders/ffmpeg.py", line 158, in check
    self.ffmpeg_version = tuple(map(int, version.groups())) if version else None
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Copy link
Contributor

@mdimopoulos mdimopoulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just don't understand how can it be that the original code was failing with version 7.1. Where is the 0?

@rgonzalezfluendo
Copy link
Contributor Author

I just don't understand how can it be that the original code was failing with version 7.1. Where is the 0?

This is the problem. No 0. ffmpeg -version output is 7.1 no 7.1.0

@rgonzalezfluendo rgonzalezfluendo changed the title Fix issue with FFmpeg version with path version is 0 Fix issue with FFmpeg version no patch version Nov 21, 2024
FFmpeg uses MAYOR.MINOR.PATCH version semantics. When patch version is
0, the reported version is only MAYOR.MINOR.

For instace, when
```
$ ffmpeg -version
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers
```

Error:
```
Traceback (most recent call last):
  File "/home/rgonzalez/src/github.com/fluendo/fluster/./fluster.py", line 23, in <module>
    fluster_main()
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/main.py", line 41, in fluster_main
    main.run()
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/main.py", line 85, in run
    args.func(args, fluster)
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/main.py", line 371, in _list_cmd
    fluster.list_decoders(check=args.check, verbose=args.verbose)
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/fluster.py", line 204, in list_decoders
    if decoder.check(verbose)
       ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rgonzalez/src/github.com/fluendo/fluster/fluster/decoders/ffmpeg.py", line 158, in check
    self.ffmpeg_version = tuple(map(int, version.groups())) if version else None
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
@rgonzalezfluendo rgonzalezfluendo merged commit 51e533f into master Nov 21, 2024
3 checks passed
@rgonzalezfluendo rgonzalezfluendo deleted the fix_ffmpeg_71 branch November 21, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants